.class final Lcom/instagram/android/creation/b/n;
.super Ljava/lang/Object;
.source "CameraFragment.java"

# interfaces
.implements Landroid/hardware/Camera$PictureCallback;


# instance fields
.field final synthetic a:Lcom/instagram/android/creation/b/a;


# direct methods
.method private constructor <init>(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 1336
    iput-object p1, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/instagram/android/creation/b/a;Lcom/instagram/android/creation/b/b;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 1336
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/b/n;-><init>(Lcom/instagram/android/creation/b/a;)V

    return-void
.end method

.method private a(Landroid/hardware/Camera;)I
    .locals 4
    .parameter

    .prologue
    .line 1397
    invoke-virtual {p1}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v0

    const-string v1, "rotation"

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    .line 1398
    const-string v1, "CameraFragment"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "cameraRotation: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 1399
    return v0
.end method


# virtual methods
.method public onPictureTaken([BLandroid/hardware/Camera;)V
    .locals 7
    .parameter "jpegData"
    .parameter "camera"

    .prologue
    .line 1342
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->o(Lcom/instagram/android/creation/b/a;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1394
    :goto_0
    return-void

    .line 1346
    :cond_0
    invoke-static {}, Lcom/instagram/b/a;->b()Lcom/instagram/b/g;

    move-result-object v0

    const-string v1, "on_picture_taken"

    invoke-interface {v0, v1}, Lcom/instagram/b/g;->a(Ljava/lang/String;)V

    .line 1348
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->k(Lcom/instagram/android/creation/b/a;)Landroid/hardware/Camera$Parameters;

    move-result-object v0

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getPictureSize()Landroid/hardware/Camera$Size;

    move-result-object v6

    .line 1349
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->p(Lcom/instagram/android/creation/b/a;)Lcom/instagram/android/creation/b/m;

    move-result-object v0

    const/4 v2, 0x0

    iget v3, v6, Landroid/hardware/Camera$Size;->width:I

    iget v4, v6, Landroid/hardware/Camera$Size;->height:I

    invoke-direct {p0, p2}, Lcom/instagram/android/creation/b/n;->a(Landroid/hardware/Camera;)I

    move-result v5

    move-object v1, p1

    invoke-virtual/range {v0 .. v5}, Lcom/instagram/android/creation/b/m;->a([BLandroid/location/Location;III)Ljava/lang/String;

    .line 1355
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->g(Lcom/instagram/android/creation/b/a;)V

    .line 1357
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->p(Lcom/instagram/android/creation/b/a;)Lcom/instagram/android/creation/b/m;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/android/creation/b/m;->b()V

    .line 1359
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->q(Lcom/instagram/android/creation/b/a;)Landroid/net/Uri;

    move-result-object v0

    if-nez v0, :cond_1

    .line 1360
    iget-object v0, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v0}, Lcom/instagram/android/creation/b/a;->r(Lcom/instagram/android/creation/b/a;)V

    goto :goto_0

    .line 1362
    :cond_1
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v1}, Lcom/instagram/android/creation/b/a;->h(Lcom/instagram/android/creation/b/a;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/instagram/camera/e;->c(I)Z

    move-result v0

    .line 1364
    new-instance v1, Landroid/content/Intent;

    iget-object v2, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-virtual {v2}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v2

    const-class v3, Lcom/instagram/android/creation/activity/MediaCaptureActivity;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 1366
    invoke-virtual {p2}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v2

    const-string v3, "rotation"

    invoke-virtual {v2, v3}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_2

    .line 1368
    :try_start_0
    invoke-direct {p0, p2}, Lcom/instagram/android/creation/b/n;->a(Landroid/hardware/Camera;)I

    move-result v2

    .line 1369
    const-string v3, "cameraRotation"

    invoke-virtual {v1, v3, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 1375
    :cond_2
    :goto_1
    const-string v2, "mediaFilePath"

    iget-object v3, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v3}, Lcom/instagram/android/creation/b/a;->q(Lcom/instagram/android/creation/b/a;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 1376
    const-string v2, "mediaSource"

    const/4 v3, 0x1

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1379
    const-string v2, "mirrorMedia"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 1380
    const-string v0, "originalWidth"

    iget v2, v6, Landroid/hardware/Camera$Size;->width:I

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1381
    const-string v0, "originalHeight"

    iget v2, v6, Landroid/hardware/Camera$Size;->height:I

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1382
    const-string v0, "originalPhotoAngle"

    iget-object v2, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v2}, Lcom/instagram/android/creation/b/a;->s(Lcom/instagram/android/creation/b/a;)F

    move-result v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;F)Landroid/content/Intent;

    .line 1384
    const-string v0, "pendingMediaKey"

    iget-object v2, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v2}, Lcom/instagram/android/creation/b/a;->t(Lcom/instagram/android/creation/b/a;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 1386
    const/high16 v0, 0x1

    invoke-virtual {v1, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 1387
    const-string v0, "directShare"

    iget-object v2, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v2}, Lcom/instagram/android/creation/b/a;->u(Lcom/instagram/android/creation/b/a;)Z

    move-result v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 1389
    invoke-static {}, Lcom/instagram/b/a;->a()Lcom/instagram/b/c;

    move-result-object v0

    iget-object v2, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-virtual {v2}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v2

    const-string v3, "camera_capture"

    invoke-interface {v0, v2, v3}, Lcom/instagram/b/c;->a(Landroid/app/Activity;Ljava/lang/String;)V

    .line 1390
    invoke-virtual {v1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/creation/b/br;->a(Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v0

    .line 1391
    new-instance v1, Lcom/instagram/e/b/a/a;

    iget-object v2, p0, Lcom/instagram/android/creation/b/n;->a:Lcom/instagram/android/creation/b/a;

    invoke-virtual {v2}, Lcom/instagram/android/creation/b/a;->m()Landroid/support/v4/app/r;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/instagram/e/b/a/a;-><init>(Landroid/support/v4/app/r;)V

    new-instance v2, Lcom/instagram/android/creation/b/al;

    invoke-direct {v2}, Lcom/instagram/android/creation/b/al;-><init>()V

    invoke-virtual {v1, v2, v0}, Lcom/instagram/e/b/a/a;->a(Landroid/support/v4/app/Fragment;Landroid/os/Bundle;)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/e/b/a/a;->e()V

    .line 1392
    invoke-static {}, Lcom/instagram/b/a;->b()Lcom/instagram/b/g;

    move-result-object v0

    const-string v1, "on_picture_taken"

    invoke-interface {v0, v1}, Lcom/instagram/b/g;->b(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 1370
    :catch_0
    move-exception v2

    goto/16 :goto_1
.end method
